import { setToken, getToken } from '@/libs/util'

export default {
  state: {
    userId: '',
    token: getToken(),
    access: []
  },
  mutations: {
    setUserId (state, id) {
      state.userId = id
    },
    setAccess (state, access) {
      state.access = access
    },
    setToken (state, token) {
      state.token = token
      setToken(token)
    }
  },
  actions: {

  }
}
